{include file="public/header" title="后台管理系统"}
<body>
<div class="panel admin-panel">
	<div class="panel-head"><strong class="icon-reorder"> 用户列表</strong>
		<a href="" style="float:right; display:none;">添加字段</a>
	</div>
	<form method="post" action="" id="listform">
		<table class="table table-hover text-center">
			<tr>
				<th width="100" style="text-align:left; padding-left:20px;">ID</th>
				<th width="15%">用户名</th>
				<th width="20%">头像</th>
				<th width="20%">权限</th>
				<th width="310">操作</th>
			</tr>
			{volist name="list['list']" id="v"}
			<tr>
				<td style="text-align:left; padding-left:20px;"><input type="checkbox" name="id[]" value="" /> {$v.id}
					<input type="hidden" name="id" value="{$v.id}">
				</td>
				<td>{$v.name}</td>
				<td width="10%"><img src="__STATIC__/{$v.headimg}" alt="" width="70" height="50" /></td>
				<td>商品管理员</td>

				<td>
					<div class="button-group">
						<a class="button border-main" href="{:url('Auth/userEdit',['id'=>$v.id])}"><span class="icon-edit"></span> 修改</a>
						<a class="button border-red" onclick="return del(1,1,1)" href="{:url('Auth/userDel',['id'=>$v.id])}" ><span class="icon-trash-o"></span> 删除</a>
					</div>
				</td>
			</tr>
			{/volist}
			<tr>
				<td style="text-align:left; padding:19px 0;padding-left:20px;"><input type="checkbox" id="checkall" /> 全选 </td>
				<td colspan="7" style="text-align:left;padding-left:20px;">
					<a href="javascript:DelSelect()" class="button border-red icon-trash-o" style="padding:5px 15px;"> 全删</a>
				</td>
			</tr>
			<tr>
				<td colspan="8">
					{$list['page']|raw}
				</td>
			</tr>
		</table>
	</form>
</div>
<script>
    //全选
    $("#checkall").click(function(){
        $("input[name='id[]']").each(function(){
            if (this.checked) {
                this.checked = false;
            }
            else {
                this.checked = true;
            }
        });
    })
    // 删除
    function del(){
        if(confirm("确认删除吗?")){

        }else{
            return false;
		}
    }
</script>
</body>
</html>